package parkingbuddy.app;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.MenuItem.OnMenuItemClickListener;
import android.widget.Button;
import android.widget.Toast;

public class start extends Activity {
    /** Called when the activity is first created. */
	final static private int SETTINGS = Menu.FIRST;
	final static private int OTH = Menu.FIRST +1;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.start);
  
    }
    @Override
	 public boolean onCreateOptionsMenu(Menu menu){
		super.onCreateOptionsMenu(menu);
		
		MenuItem itemSett = menu.add(0, SETTINGS, Menu.NONE, R.string.sett);
		MenuItem itemOth = menu.add(0, OTH, Menu.NONE, R.string.oth);

		
		itemSett.setShortcut('0', 'a');
   	itemOth.setShortcut('1', 'r');
		
   	itemOth.setOnMenuItemClickListener(new OnMenuItemClickListener() {
			
			public boolean onMenuItemClick(MenuItem arg0) {
					System.exit(2);
				return false;
			}
		});
   	itemSett.setOnMenuItemClickListener(new OnMenuItemClickListener() {
		
		public boolean onMenuItemClick(MenuItem item) {
			Intent it = new Intent (getApplicationContext(), options.class);
			startActivity(it);
			return false;
		}
	});
		return true;
	 }
}